package com.bigger.arch.app.web.filter;

import org.springframework.stereotype.Component;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/*@Component
@WebFilter(filterName = "BiggerAppFilter",urlPatterns = "/*")*/
public class BiggerAppFilter implements Filter {

    public void init(FilterConfig filterConfig) throws ServletException {
        System.out.println("BiggerAppFilter.init");
    }

    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("BiggerAppFilter.doFilter before");
        filterChain.doFilter(servletRequest, servletResponse);
        System.out.println("BiggerAppFilter.doFilter after");
    }

    public void destroy() {
        System.out.println("BiggerAppFilter.destroy");
    }
}
